package com.eduagent.xwqeduagent.openFeign.result;

public enum CodeStatus {

    SUCCESS(200, "操作成功"),
    BAD_REQUEST(400, "参数错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "没有权限"),
    NOT_FOUND(404, "资源不存在"),
    INTERNAL_SERVER_ERROR(500, "系统异常"),
    LOGIN_REQUIRED(4001, "请先登录"),
    PARAM_IS_BLANK(4002, "参数为空"),
    DATA_NOT_FOUND(4003, "数据不存在"),
    DATA_ALREADY_EXISTS(4004, "数据已存在"),
    VALIDATE_FAILED(4005, "参数校验失败");

    public final Integer code;
    public final String message;

    CodeStatus(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}